﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SCGILite.SCgi;
using System.Net;
using SCGILite;
using SCGILite.Helper;
using SCGILite.NetLib;
using System.IO;
using System.Threading;
using System.Web.UI;
using SCGITest.PageTemplate;

namespace SCGITest
{
    class DemoSCGIService: SCgiService<DemoSCGISession>
    {
        PageFactory factory = new PageFactory();
        #region ctor
        public DemoSCGIService(IPEndPoint e)
            : base(e)
        {
            factory.Init();
        }
        #endregion

        #region ctorSession
        public override DemoSCGISession ctorSession(ISocketSession tcp)
        {
            DemoSCGISession a = new DemoSCGISession(tcp);
            a.OnBody = factory.OnSCGIBody;
            a.OnException = factory.OnErr;
            return a;
        }
        #endregion
    }
}
